﻿{%  extends 'base.html' %}
{% block content %}
    <div id="main-container" class="container clearfix">
        <section class="post-left">
            <div class="row">
                <!-- /banner图 -->
                <div class="col-md-6">
                    <div id="featured" class="raxus-slider" data-autoplay="3000" data-keypress="false"
                         data-thumbnail="bottom">
                        <ul class="slider-relative" id="relative">
                            {% for banner in banners %}
                                <li class="slide fix-width">
                                    <a href="{{ banner.link_url }}" title="{{ banner.text_info }}">
                                        <img src="{% url 'index' %}media/{{ banner.img }}" srcset="{% url 'index' %}media/{{ banner.img }}" alt="{{ banner.text_info }}"
                                             class="wp-post-image"  width="370" height="290"/></a>
                                    <span class="text ani-left"><strong>{{ banner.text_info }}</strong></span>
                                </li>
                            {% endfor %}
                        </ul>
                            

                    </div>

                </div>
                <!-- /banner图 -->

                <!-- 首页推荐 -->
                <div class="col-md-6">
                    <div class="hotread ">
                        <div class="title">推荐阅读</div>
                        {% for tui in tuis  %}
                            <div class="caption">
                                <h4><a href="{% url 'index' %}show-{{ tui.id }}.html" title="{{ tui.title }}" rel="bookmark">{{ tui.title }}</a></h4>
                                <p>{{ t.excerpt|truncatechars:"80" }}</p>
                            </div>
                        {% endfor %}
                    </div>
                </div>
                <!-- /今日头条 -->
            </div>
            <!-- /文章列表 -->
            <div class="index-main clearfix">
                <div class="main-title">
                    <h4 class="post-left-title fl">最新文章</h4>
                    <div class="fr"></div>
                </div>
                <div class="row">
                    {% for new_article in new_articles %}
                        <div class="article-box clearfix excerpt-1">
                            <div class="col-md-4">
                                <div class="thumbnail">
                                    <a href="{% url 'index' %}show-{{ new_article.id }}.html" title="{{ new_article.title }}">
                                        <img src="media/{{ new_article.img }}"
                                             srcset="media/{{ new_article.img }}"
                                             alt="{{ new_article.title }}" class="wp-post-image" width="240" height="160"/></a>
                                </div>
                            </div>
                            <div class="col-md-8">
                                <h2><a href="{% url 'index' %}show-{{ new_article.id }}.html" target="_blank" title="{{ new_article.title }}">{{ new_article.title }}</a></h2>
                                <p class="txtcont hidden-xs"><a href="{% url 'index' %}show-{{ new_article.id }}.html" target="_blank"
                                                                title="{{ new_article.title }}">{{ new_article.excerpt }}</a></p>
                                <div class="meta"><span class="label label-info"><a
                                        href="{% url 'index' %}show-{{ new_article.category.id }}.html">{{ new_article.category.name }}</a></span>
                                    <time class="item"><i class="fa fa-clock-o"></i>{{ new_article.created_time|date:'Y年m月d日' }}
                                    </time>
                                </div>
                            </div>
                        </div>
                    {% endfor %}
                </div>
            </div>
                <!-- /文章列表 -->
        </section>
        <!-- /post-left -->
        <aside class="post-right hidden-xs">
            <section class="widget post-right-item">
                <h4 class="post-right-title">热门文章推荐</h4>


                <ol class="post-hot clearfix">
                {% for h in hot %}
                    <li><a href="{% url 'index' %}show-{{ h.id }}.html" title="{{ h.title }}">{{ h.title }}</a></li>
                {% endfor %}
                </ol>
            </section>
        {% include 'right.html' %}
        </aside>
        <div class="FriendLink hidden-xs clearfix">
            <div class="title"><h3>友情链接：</h3></div>
            <ul class="clears">
                {% for link in links %}
                    <li><a href="{{ link.link_url }}" target="_blank">{{ link.name }}</a></li>
                {% endfor %}
            </ul>
        </div>
    </div>
{% endblock %}

